package com.zmc.lostfound.auth.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zmc.lostfound.auth.entity.RolePermissionEntity;
import com.zmc.lostfound.auth.vo.RolePermissionSaveVO;
import com.zmc.lostfound.common.utils.Result;

import java.util.List;

/**
 * @author GXC
 * @description 角色&权限关联信息业务接口
 * @email 2869581855@qq.com
 * @date 2023-07-05 15:17:37
 */
public interface RolePermissionService extends IService<RolePermissionEntity> {

    /**
     * 新增角色&权限关联信息
     *
     * @param rolePermissionSaveVO 角色&权限关联信息新增/修改请求体
     * @return Result
     */
    Result insertRolePermission(RolePermissionSaveVO rolePermissionSaveVO);

    /**
     * 修改角色&权限关联信息
     *
     * @param rolePermissionSaveVO 角色&权限关联信息新增/修改请求体
     * @return Result
     */
    Result updateRolePermission(RolePermissionSaveVO rolePermissionSaveVO);

    /**
     * 按主键ids批量删除角色&权限关联信息
     *
     * @param ids 主键ids
     * @return Result
     */
    Result deleteBatchByIds(List<Long> ids);

    /**
     * 按角色id和权限id删除角色&权限关联信息
     *
     * @param roleId       角色id
     * @param permissionId 权限id
     * @return Result
     */
    Result deleteByRoleIdAndPermissionId(Long roleId, Long permissionId);

}

